// 引入mapper数据持久层类
const { folderMap } = require("../../mapper");

exports.createFolderImpl = async (
  folderid,
  foldername,
  userid,
  username,
  parentfolderid
) =>
  await folderMap.createFolderMap(
    folderid,
    foldername,
    userid,
    username,
    parentfolderid
  );

exports.updateFolderImpl = async (id, name, state) =>
  await folderMap.updateFolderMap(id, name, state);
exports.findFolderImpl = async (userid, folderid, state) =>
  await folderMap.findFolderMap(userid, folderid, state);

// 辅助函数（查找用户下的指定文件名）
exports.findFolderByNameImpl = async (userid, foldername) =>
  await folderMap.findFolderByNameMap(userid, foldername);
